package com.hee.erp.modules.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hee.erp.modules.entity.CarBuyingFiles;
import com.hee.erp.modules.mapper.CarBuyingFilesMapper;
import com.hee.erp.modules.service.ICarBuyingFilesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.lang.invoke.LambdaConversionException;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author weizehong
 * @since 2022-05-02
 */
@Service
@Transactional
public class CarBuyingFilesServiceImpl extends ServiceImpl<CarBuyingFilesMapper, CarBuyingFiles> implements ICarBuyingFilesService {

    @Override
    public List<CarBuyingFiles> getListByCarId(String carId) {

        LambdaQueryWrapper<CarBuyingFiles> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(CarBuyingFiles::getCarId, carId);

        List<CarBuyingFiles> list = this.list(queryWrapper);
        return list;
    }

    @Override
    public List<CarBuyingFiles> listByCarId(String id) {

        LambdaQueryWrapper<CarBuyingFiles> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(CarBuyingFiles::getCarId, id);

        List<CarBuyingFiles> list = this.list(queryWrapper);
        return list;
    }
}
